package k.daniel.android.view;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

/**
 * Created by daniel on 2015/4/17.
 */
public class TxViewPager extends ViewPager {
    private boolean scrollable = false;
    public TxViewPager(Context context) {
        super(context);
    }

    public TxViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent event) {
        if (scrollable) {
            return super.onInterceptTouchEvent(event);
        } else {
            return false;
        }
    }
}
